<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script src="spellcheck_test.js"></script>

<script>
spellcheck_test(
    '<input type="text">',
    document => {
        document.querySelector('input').focus();
        document.execCommand('insertText', false, 'A');
    },
    '<input type="text" value="A">',
    {
      title: 'Initial setup.',
      callback: sample => spellcheck_test(
      sample,
      document => {
        document.execCommand('selectAll');
        document.execCommand('cut');
        document.execCommand('paste');
        document.execCommand('insertText', false, 'A');
      },
      '<input type="text" value="AA">',
      'Spell check does not crash after Ctrl-X/Ctrl-V/type text in ASAN.')
    });
</script>
